home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
misc
/
math
/
MathFX_src.lha
/
fxabv.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-20
|
496b
|
24 lines
#include "mathfx.h"
/* Determines if point (px,py) lies above the line joining (sx1,sy1) to */
/* (sx2,sy2). It only works correctly if sx1 <= px <= sx2 */
int fxabv(px, py, sx1, sy1, sx2, sy2)
int px, py, sx1, sy1, sx2, sy2;
{
int above;
if (py >= sy1 && py >= sy2)
above = 1;
else if (py < sy1 && py < sy2)
above = 0;
else if ((sx2-sx1) * (py-sy1) > (px-sx1) * (sy2-sy1))
above = 1;
else
above = 0;
return(above);
}